/*
 * Message.h
 *
 *  Created on: Aug 12, 2012
 *      Author: nam20485
 */

#ifndef MESSAGE_H_
#define MESSAGE_H_

class Message
{
public:
	typedef enum
	{
		STANDARD,
		BYTE_STREAM
	} Type;

	Message(Type eType);
	virtual ~Message();

	inline Type getType() const	{ return m_eType; }

	virtual void GetBytes(unsigned char* aBytes, unsigned long& ulCount);

	class Header
	{
	public:
		Header(Type eType, unsigned long ulLength);
		virtual ~Header();

		inline Message::Type getType() const { return m_eType; }
		inline unsigned long getLength() const { return m_ulLength; }

	protected:
		const Type m_eType;
		const unsigned long m_ulLength;
	};

protected:
	Type m_eType;

};

#endif /* MESSAGE_H_ */
